package Thread;

public class ThreadDemo5 {
    public static void main(String[] args) {
        Thread t = new Thread(()->{
            while (true){
                System.out.println("666");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            }
        },"奥里给");
        t.setDaemon(false);

        t.start();
        System.out.println("线程名字");
        System.out.println(t.getName());
        System.out.println("线程优先级");

        System.out.println(t.getPriority());
        System.out.println("线程ID");

        System.out.println(t.getId());
        System.out.println("后台线程");
        System.out.println(t.isDaemon());
        System.out.println("是否中断");
        System.out.println(t.isInterrupted());
        System.out.println("是否存活");
        System.out.println(t.isAlive());
    }
}
